# -*- coding: utf-8 -*-
"""
Created on Thu Dec 14 20:33:42 2017

@author: 69092
"""

import jieba
import jieba.analyse
jieba.enable_parallel(6)

sentence = open("xaa", encoding='utf-8').read()

keywords = jieba.analyse.extract_tags(sentence, topK=100, withWeight=True, allowPOS=('n','nr','ns',"nt"))

# print(type(keywords))
# <class 'list'>
for item in keywords:
    key=item[0] + ","+item[1]
    f = open('hottest.txt', 'w')
    f.write(key)
    f.close()
    